home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / e / misc.txt / 000178_arthur.marsh@internode.on.net_Mon Jun 30 09:41:54 2008.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Path: reader2.panix.com!panix!news.linkpendium.com!news.linkpendium.com!pit-transit.telstra.net!lon-in.news.telstra.net!news.telstra.net!news-server.bigpond.net.au!53ab2750!not-for-mail
  2. From: Arthur Marsh <arthur.marsh@internode.on.net>
  3. User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509)
  4. MIME-Version: 1.0
  5. Newsgroups: comp.protocols.kermit.misc
  6. Subject: Re: compiler warning when compiling ftp://ftp.columbia.edu/kermit/test/tar/x.tar.gz
  7. References: <dd9ih5-31m.ln1@CPE-124-182-119-184.sa.bigpond.net.au> <slrng52q33.cri.fdc@panix2.panix.com> <NqKdnau5iKTOm8bVnZ2dnUVZ_jadnZ2d@posted.nuvoxcommunications>
  8. In-Reply-To: <NqKdnau5iKTOm8bVnZ2dnUVZ_jadnZ2d@posted.nuvoxcommunications>
  9. Content-Type: text/plain; charset=UTF-8; format=flowed
  10. Content-Transfer-Encoding: 7bit
  11. Message-ID: <f240j5-a8j.ln1@CPE-124-182-251-164.sa.bigpond.net.au>
  12. Lines: 67
  13. Date: Sat, 21 Jun 2008 20:18:09 GMT
  14. NNTP-Posting-Host: 144.137.197.243
  15. X-Complaints-To: abuse@bigpond.net.au
  16. X-Trace: news-server.bigpond.net.au 1214079489 144.137.197.243 (Sun, 22 Jun 2008 06:18:09 EST)
  17. NNTP-Posting-Date: Sun, 22 Jun 2008 06:18:09 EST
  18. Organization: BigPond Internet Services
  19. Xref: panix comp.protocols.kermit.misc:15770
  20.  
  21. Robert Bonomi wrote, on 2008-06-20 10:52:
  22. > In article <slrng52q33.cri.fdc@panix2.panix.com>,
  23. > Frank da Cruz  <fdc@columbia.edu> wrote:
  24. >> On 2008-06-04, Arthur Marsh <arthur.marsh@internode.on.net> wrote:
  25. >> : I don't know if this is worth checking:
  26. >> :
  27. >> : gcc-4.3 -O3 -march=pentium2 -funsigned-char -pipe -DPOSIX -DLINUX 
  28. >> : -DNOCOTFMC -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
  29. >> : -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DZLIB -DCK_CURSES -DCK_POSIX_SIG 
  30. >> : -DTCPSOCKET -DLINUXFSSTND -DHAVE_CRYPT_H -DFNFLOAT -DCK_SHADOW 
  31. >> : -I/usr/include/openssl  -DOPENSSL_097 
  32. >> : -DKTARGET=\"linux+openssl+zlib+shadow+pam\" -c ckuusx.c
  33. >> : ckuusx.c: In function 'ck_termset':
  34. >> : ckuusx.c:6181: warning: cast from pointer to integer of different size
  35. >> : ckuusx.c:6188: warning: cast from pointer to integer of different size
  36. >> : ckuusx.c:6195: warning: cast from pointer to integer of different size
  37. >> :
  38. >> This is something in the termcap / termlib / ncurses library.  I'd say
  39. >> if the file-transfer display still works OK (which is really the only
  40. >> things that uses curses, except a few commands like CLEAR SCREEN), then
  41. >> it's nothing to worry about.
  42. >>
  43. >> : ck_ssl.c: In function 'tls_load_certs':
  44. >> : ck_ssl.c:1171: warning: cast from pointer to integer of different size
  45. >> : ck_ssl.c:1172: warning: cast from pointer to integer of different size
  46. >> :
  47. >> : This is being compiled on Debian GNU/Linux unstable on a Pentium II machine.
  48. >> :
  49. >> I'm told that these are nothing to worry about either.  We've always had
  50. >> tons of warnings when building with the security libraries and header files,
  51. >> yet the features still work OK when used.  Still, it would be nice avoid the
  52. >> warnings.
  53. > _ALL_ these statements are invocations of the 'debug()' macro.  'debug()'
  54. > expands to a function where the 4th parameter is defined as a CK_OFF_T.
  55. > The offending invocations all have a 4th parameter that is a "pointer to
  56. > something".  Which *VIOLATES* the specification of the dodebug() routine
  57. > (in ckuusx.c, line 4849) that the debug() macro expands to.
  58. > Anyway, the result is a "size mis-match" in these circumstances
  59. > between a (void *) and a CK_OFF_T.
  60. > CK_OFF_T is specced as a type big enough to hold a _file_ offset, and
  61. > since it's being compiled with _LARGEFILESOURCE this is a 64-bit qty.
  62. > _APPARENTLY_, the compilation options only use a 32-bit _program_ address-
  63. > space, thus generating the mis-match.
  64. > FIX:
  65. >  ckuusx.c -- change the last parameter of debug() from "" to 0 on all 3 lines.
  66.  
  67. Done, and working thanks!
  68.  
  69. >  ck_ssl.c -- no obvious foolproof fix here.  Explicitly casting the last
  70. >        param of the macro to an 32-bit qty -- e.g. "debug(..((int32)ctx))"
  71. >        should work, as long as there is a defined 'int32' type.  
  72. >        `
  73. >        [ I'm assuming that sooner or later somebody _will_ try to compile    ]
  74. >        [ C-Kermit on a machine with 32-bit pointers, but only 16-bit ints.   ]
  75. >        [ If one decides that it is 'safe' to ignore that case, then a simple ]
  76. >        [ ((int)ctx) would work.                                              ]
  77.  
  78. Arthur.